package br.com.caelum.lojavirtual.logic;

import java.util.List;

import org.vraptor.annotations.Component;
import org.vraptor.annotations.InterceptedBy;

import br.com.caelum.lojavirtual.dao.DaoFactory;
import br.com.caelum.lojavirtual.modelo.Venda;

@Component("compras")
@InterceptedBy(DaoInterceptor.class)
public class LojaAdminLogic {

	
	//private List<Venda> vendas;
	private Venda venda;
	private final DaoFactory daoFactory;
	
	public LojaAdminLogic(DaoFactory daoFactory) {
		this.daoFactory = daoFactory;
	}
	
	public void lista(){}
	
	public List<Venda> getVendas() {
		return this.daoFactory.getVendaDao().listaTudo();
	}
	public Venda getVenda() {
		return venda;
	}
}
